package com.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;

import com.dao.Archive;
import com.dao.File;
import com.pojo.Filepojo;
import com.util.MySqlSessionFactory;

public class FileService {
	SqlSession sql = MySqlSessionFactory.getSqlSession();
	File dao = sql.getMapper(File.class);

	public void info(@Param("archive_id") String archive_id,
			@Param("name") String name) {
		dao.info(archive_id, name);
		sql.commit();
	}

	public List<Filepojo> query_file(@Param("id") String id) {
		dao.query_file(id);
		return dao.query_file(id);
	}

	public List<Filepojo> querydel(@Param("id") String id) {
		return dao.querydel(id);
	}

	public void deletephoto(@Param("id") String id) {
		dao.deletephoto(id);
		sql.commit();
	}
}
